<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>facerecognition.scene.Scene</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;facerecognition ::
        <a href="facerecognition.scene-module.html">Module&nbsp;scene</a> ::
        Class&nbsp;Scene
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="facerecognition.scene.Scene-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Scene</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Scene</strong>
</pre>

<hr />
<p>Base of the program. Each window gets set and drawn here. Backgrounds,
  buttons and text get drawn here. Each window atleast has a display screen
  and a window name.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">screen</span>,
        <span class="summary-sig-arg">window</span>,
        <span class="summary-sig-arg">window_buttons</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">users</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">title</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Initialization of Scene where the current window is set.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#main_loop" class="summary-sig-name">main_loop</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Starting the loop of the program Quits the program when you're in the
      main window and hit escape, else it will just return to it.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#draw_background" class="summary-sig-name">draw_background</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">background</span>)</span><br />
      Draws the background picture on the screen.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="track_main_buttons"></a><span class="summary-sig-name">track_main_buttons</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Tracks all buttons in the main window, performing an action depending
      on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#track_login_buttons" class="summary-sig-name">track_login_buttons</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Tracks all buttons in the login window, performing an action 
      depending on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#track_create_buttons" class="summary-sig-name">track_create_buttons</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">box</span>)</span><br />
      Tracks all buttons in the create user window, performing an action 
      depending on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#track_picture_buttons" class="summary-sig-name">track_picture_buttons</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>,
        <span class="summary-sig-arg">img</span>,
        <span class="summary-sig-arg">box</span>)</span><br />
      Tracks all buttons in the take picture window, performing an action depending on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#track_match_buttons" class="summary-sig-name">track_match_buttons</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Tracks all buttons in the match window, performing an action 
      depending on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#track_user_list_buttons" class="summary-sig-name">track_user_list_buttons</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Tracks all buttons in the user list window, performing an action 
      depending on the button pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#learn_system" class="summary-sig-name">learn_system</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user</span>)</span><br />
      Saves and links the captured picture(s) to the name when pressed.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#set_scene" class="summary-sig-name">set_scene</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">screen</span>,
        <span class="summary-sig-arg">window</span>,
        <span class="summary-sig-arg">window_buttons</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">users</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">title</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Sets the current scene.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#create_button" class="summary-sig-name">create_button</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">pos</span>,
        <span class="summary-sig-arg">b</span>,
        <span class="summary-sig-arg">b_ro</span>)</span><br />
      Adds a button to the buttons list.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#draw_text" class="summary-sig-name">draw_text</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">fontsize</span>,
        <span class="summary-sig-arg">color</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      Draws a text line...</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="draw_matches"></a><span class="summary-sig-name">draw_matches</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Draws the match (user) buttons showing their Title, First and Last 
      name.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="draw_buttons"></a><span class="summary-sig-name">draw_buttons</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Draws all buttons that were created by create_button().</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.scene.Scene-class.html#draw_window_buttons" class="summary-sig-name">draw_window_buttons</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">vertical</span>=<span class="summary-sig-default">True</span>)</span><br />
      Draws all window buttons specified for each window.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="main_window"></a><span class="summary-sig-name">main_window</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Sets the scene to main window</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="login_window"></a><span class="summary-sig-name">login_window</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Sets the scene to login window</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="take_picture_window"></a><span class="summary-sig-name">take_picture_window</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Sets the scene to take picture window</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_user_window"></a><span class="summary-sig-name">create_user_window</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Sets the scene to create user window</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="match_window"></a><span class="summary-sig-name">match_window</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">users</span>)</span><br />
      Sets the scene to match window Parameters: list users - list of users
      where each user contains an user_id, title, first and last name in 
      this order</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="user_list_window"></a><span class="summary-sig-name">user_list_window</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">match_found</span>)</span><br />
      Sets the scene to user list window Parameters: bool match_found - 
      Determines the title of this window.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">screen</span>,
        <span class="sig-arg">window</span>,
        <span class="sig-arg">window_buttons</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">users</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">title</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Initialization of Scene where the current window is set.
Creates a SQL, Inputbox and FaceDetect instance.
Eventually starts the program by calling the main_loop()
Parameters: display screen - drawing screen
            string window - window name (choices: Main, Login, Create User, Pictures, Match, Users List) 
            list window_buttons - list of button names
            list users - list of users where each user contains an user_id, title, first and last name in this order
            string title - title of the window

</pre>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="main_loop"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">main_loop</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Starting the loop of the program Quits the program when you're in the 
  main window and hit escape, else it will just return to it. This loop 
  checks which window should be drawn by looking at self.window. Each 
  window has it's own buttons and track_buttons. Track_buttons checks which
  button is pressed.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="draw_background"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">draw_background</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">background</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Draws the background picture on the screen. Parameters: string 
  background - name of the background image</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="track_login_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_login_buttons</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Tracks all buttons in the login window, performing an action depending
  on the button pressed. Try Again - Resets the countdown, starting over 
  again. Back - Returns to the main window</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="track_create_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_create_buttons</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">box</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Tracks all buttons in the create user window, performing an action 
  depending on the button pressed. Create - Returns True which simply 
  determines if the button is pressed. Back - Cleans the inputbox and 
  returns to the main window Parameters: Inputbox box - instance of 
  Inputbox()</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="track_picture_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_picture_buttons</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>,
        <span class="sig-arg">img</span>,
        <span class="sig-arg">box</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Tracks all buttons in the take picture window, performing an action depending on the button pressed.
Shoot - Takes a picture, saves it in 'capture/' and in the database, linking it to the user_id entered in the inputbox.
Back - Cleans the inputbox and returns to the main window
Parameters: int user_id - user identification code
            IplImage img - image of frame of the (web)cam
            Inputbox box - instance of Inputbox()

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="track_match_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_match_buttons</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Tracks all buttons in the match window, performing an action depending
  on the button pressed. Try Again - Reloads the login window. Main menu - 
  Return to the main window. Users List - Shows the users list window and 
  sets self.match_found = True, determing the window title that will be 
  shown. Reload - Refines the matches. The matches (names) shown are 
  buttons aswell which saves and links the captured picture(s) to the name 
  when pressed.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="track_user_list_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_user_list_buttons</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Tracks all buttons in the user list window, performing an action 
  depending on the button pressed. Back - Return to the main window. The 
  names shown are buttons aswell which saves and links the captured 
  picture(s) to the name when pressed.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="learn_system"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">learn_system</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Saves and links the captured picture(s) to the name when pressed. 
  Saving the picture in 'capture/' and linking it to the user through 
  user_id by creating an user_face in the database. Parameters: list user: 
  list of user parameters which should contain user_id, title, first and 
  last name in this order.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="set_scene"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_scene</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">screen</span>,
        <span class="sig-arg">window</span>,
        <span class="sig-arg">window_buttons</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">users</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">title</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Sets the current scene.
Parameters: display screen - drawing screen
            string window - window name (choices: Main, Login, Create User, Pictures, Match, Users List) 
            list window_buttons - list of button names
            list text - list users (where each user contains an user_id, title, first and last name in this order)
            string title - title of the window

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="create_button"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_button</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">pos</span>,
        <span class="sig-arg">b</span>,
        <span class="sig-arg">b_ro</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Adds a button to the buttons list. This function can be used for different buttons on a specific locations.
Parameters: string name - name of the button
            topleft pos - position of the button (x, y)
            string b - name of the button image
            string b_ro - name of the button image when selected

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="draw_text"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">draw_text</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>,
        <span class="sig-arg">fontsize</span>,
        <span class="sig-arg">color</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Draws a text line
Parameters: string text - Text string
            int fontsize - The size of the font
            Color color - color of the text
            string x - x position of the text (LEFT, CENTER or RIGHT)
            int y - y position of the text

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="draw_window_buttons"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">draw_window_buttons</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">vertical</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Draws all window buttons specified for each window. Parameters: bool 
  vertical - if True then the buttons are drawn vertically, if False then 
  the buttons are drawn horizontally.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jul  5 14:23:35 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
